#ifndef STATION_H
#define STATION_H

#include <QMainWindow>
#include "UdpHandler.h"
#include <qwebengineview.h>
#include"udpdata.h"
#include <Eigen/Dense>
#include <Eigen/Core>
#include "SignalProcessor.h"

QT_BEGIN_NAMESPACE
namespace Ui {
class Station;
}
QT_END_NAMESPACE

class bridge : public QObject
{
    Q_OBJECT
public:
    explicit bridge(QObject *parent = 0);

signals:
    void DisplayPoint(const QString &lng,const QString &lat);

public slots:
    void RcvPoint(const QString &lng,const QString &lat);
};

class Station : public QMainWindow
{
    Q_OBJECT

public:
    Station(QWidget *parent = nullptr);
    ~Station();

private slots:
    void on_btn_listen_clicked();
    void on_clean_server_clicked();
    void handleDataReceived(const QString &data, const QHostAddress &address, quint16 port);
    void contextMenuRequest(QPoint);

private:
    Ui::Station *ui;
    UdpHandler *udpHandler;
    udpdata *sigprocess ;
    SignalProcessor *processor;
    void setupTableWidget();
    void initMap();
    void initData();
    void initsetting();

private:
    double fs = 30.72e6; //采样率
    double fc = 3.2e6; //频率
    double T = 0.0001;
    double fft_num = 4096.0; //fft点数
    double k = 4e10;
    double snr = 10.0; //信噪比
};
#endif // STATION_H
